-- GENERATED SPELL FOR [Scarlet Spellbinder] --


function spell0_4494(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_4494', 8299, 1)
end

function spell1_4494(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20822,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4494', 7000, 1)
end

function spell2_4494(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4494', 10000, 1)
end

function Sorts_4494(pUnit, Event)
local choix_sorts_4494 = math.random(0, 2)
if choix_sorts_4494 == 0 then
pUnit:RegisterEvent('spell0_4494', 1, 1)
end
if choix_sorts_4494 == 1 then
pUnit:RegisterEvent('spell1_4494', 1, 1)
end
if choix_sorts_4494 == 2 then
pUnit:RegisterEvent('spell2_4494', 1, 1)
end
end

function mob4494_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4494', math.random(1500, 3000), 1)
end

function mob4494_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4494_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4494_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4494, 1, 'mob4494_Action')
RegisterUnitEvent(4494, 2, 'mob4494_Leave')
RegisterUnitEvent(4494, 3, 'mob4494_Kill')
RegisterUnitEvent(4494, 4, 'mob4494_Die')
